<%@ Page Language="C#" EnableViewState="false" ValidateRequest="false" AutoEventWireup="true" 
	MasterPageFile="~/App_ThemeMasters/NoStyle/OneColumnLayout.Master" Inherits="Syrinx.Gui.AspNet.Ajax.NitobiBasePage" EnableEventValidation="false" %>
<%@ Register Assembly="Swaf.Gui.AspNet2" Namespace="Swaf.Gui.AspNet2" TagPrefix="swf" %>
<%@ Register Assembly="ScsAspNet" Namespace="Syrinx.Gui.AspNet.Ajax" TagPrefix="saj" %><%@ Register Assembly="NitobiControls" Namespace="Nitobi" TagPrefix="ntb" %>
<%@ Register Assembly="ScsAspNet" Namespace="Articles.Gui.AspNet" TagPrefix="art" %>

<!--#include file="~/SiteControls/RegisterStandardControls.txt"-->
<!--#include file="../SiteControls/StandardHeaderPageContent.inc"-->
<!--#include file="../SiteControls/StandardFooterPageContent.inc"-->

<script runat="server">
	public string TitleFormat = "$thread.title$ - $glgo.title$";
</script>


<asp:Content ID="c1" ContentPlaceHolderID="title" runat="server">
	<swf:BizProc runat="server" ID="thread" FactoryName="Forums">
		<State includeSelf="true" entireTree="false" isPaging="true" listDetailLevel="idAndTitle" EditModeSessionKey="NeverEdit" />
	</swf:BizProc>
	<swf:BizProc runat="server" ID="replies" FactoryName="Forums">
		<State includeAuthorContactDetail="true" includeSelf="true" isPaging="true" orderBy="(CASE WHEN [publishDate] IS NULL THEN nc.dateCreated ELSE [publishDate] END)" includeCounts="true" entireTree="false" listDetailLevel="fullDetails" EditModeSessionKey="ForumEdit" incrementCounts="false" />
		<ParentBizProc id="thread" fieldName="id" dataId="pid" />
	</swf:BizProc>
	<swf:BizProc runat="server" id="t" FactoryName="articleTrail">
		<ParentBizProc id="replies" fieldName="id" dataId="pid" />
		<State hideLast="true" />
	</swf:BizProc>
	<%-- 
	<swf:BizProc runat="server" ID="captcha" FactoryName="captchaVerify">
		<ParentBizProc id="loginBP" />
		<ParentBizProc id="replies" dataId="pid" />
		<State usage="canedit" />
	</swf:BizProc>
	--%>
	<h1>
	<art:ArticleTranslationDisplay runat="server" ID="f3"
		ParentBizProcIds="thread" ReadOnlyTemplate="Articles.Gui.AspNet.ArticleRODisplay-TitleOnly" />
	</h1>
</asp:Content>

<asp:Content ID="c0" runat="server" ContentPlaceHolderID="mainContent">
<art:ArticleParentTrail runat="server" ID="ArticleParentTrail1"
	ParentBizProcIds="t" 
	ReadOnlyTemplate="Articles.Gui.AspNet.ArticleParentTrail-Simple">
	<macros partTitle="$title$"  navLink0="$CmpSetting(sitePath)$/std/$root$.aspx"
		navLink1="$CmpSetting(sitePath)$/std/$root$.aspx"
		navLink2="$CmpSetting(sitePath)$/std/forum.aspx?forumid=$uniqueId$&amp;troot=$root$" />
</art:ArticleParentTrail>
<%--
<saj:NitobiBizObjDisplay runat="server" ID="cap1" ParentBizProcIds="captcha"
	ReadOnlyTemplate=""
	EditableTemplate="Syrinx.Gui.AspNet.CaptchaDisplay" />
 --%>
 <saj:ActionButton runat="server" ID="_trans" Actions="replies.TranslateAllChildren" Text="Translate Thread" />
<span class="button1"><saj:ActionButton runat="server" ID="_pst1" Actions="replies.AddBizObj" Text="Post Reply" /></span>
<span class="button6"><saj:ActionButton runat="server" ID="_pst2" Actions="replies.UpdateBizObj" Text="Submit Changes" /></span>
<span class="button1"><saj:ActionButton runat="server" ID="_pst3" Actions="replies.CancelEdits" Text="Cancel" /></span>
<span class="button5"><saj:ActionButton runat="server" ID="_pst4" Actions="replies.DeleteBizObj" Text="Delete" ClientClick="if(!confirm('Are you sure you want to delete?'))return false;"/></span>
<span class="button4"><saj:ActionButton runat="server" ID="_pst6" Actions="replies.SwitchEdit" Text="Edit" SessionBoolSwitch="ForumEdit"  /></span>
<art:ArticleTranslationDisplay runat="server" ID="f2"
	ParentBizProcIds="replies" 
	TranslationTemplate="Articles.Gui.AspNet.ArticleTranslationRWDisplay"
	ReadOnlyTemplate=""
	EditableTemplate="Forums.Gui.AspNet.ForumPostRWDisplay-Style1" >
	<macros imageRes="Thumbnail" />
</art:ArticleTranslationDisplay>

<div style="width:98%">
<saj:NitobiPaginationDisplay ID="tpager" runat="server" ParentBizProcIds="replies" SkinID="Forum" />

<saj:ComplexBizObjListDisplay ID="f1" runat="server" ParentBizProcIds="replies" CssClass="ForumThreadList" MaxElements="25"
	ReadOnlyTemplate="Forums.Gui.AspNet.ThreadROListDisplay-Style1"
	EditableTemplate="Forums.Gui.AspNet.ThreadListDisplay-Style1">
	<macros avitarImageRes="Thumbnail" avitarMediaCache="LinCImages"
	imageRes="SmallThumbnail" navLink="$AjaxCall-BizObjSelected$" NumLayers="9" LayersClass="GrSqToWh" readOnlyForumNavLink="" />
</saj:ComplexBizObjListDisplay>		

<saj:NitobiPaginationDisplay ID="bpager" runat="server" ParentBizProcIds="replies"  SkinID="Forum"/>
</div>
</asp:Content>

